import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
// import zhCn from 'element-plus/es/locale/lang/zh-cn'

import router  from "./router/index";

import {createPinia}  from 'pinia';
import moment from 'moment';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import '@/permisstion'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
moment.locale('zh-cn');

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})

app.use(router);

const pinia=createPinia()

app.use(pinia);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}



app.config.globalProperties.$moment = moment
app.mount('#app')